package cn.techjc.dao;

import org.springframework.stereotype.Repository;

import cn.techjc.domain.UsersVoteInfo;
import cn.techjc.utils.BaseDao;

@Repository
public class UsersVoteInfoMapper extends BaseDao{

	public void insert(UsersVoteInfo voteInfo) {
		voteInfo.setId(getTimeID());
		getSqlSession().insert("voteInfo.insert", voteInfo);
	}

	public int voteLimit(String ip) {
		int count =getSqlSession().selectOne("voteInfo.total",ip);
		return count;
	}
}